<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!doctype html>
<html lang="en-US">

<head>
<!-- META TAGS -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>人人为我，我为人人</title>

<link rel="shortcut icon" href="images/favicon.png" />

<!-- Style Sheet-->
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<link rel="stylesheet" href="css/style.css" />
<link rel='stylesheet' id='bootstrap-css-css'
	href='css/bootstrap5152.css?ver=1.0' type='text/css' media='all' />
<link rel='stylesheet' id='responsive-css-css'
	href='css/responsive5152.css?ver=1.0' type='text/css' media='all' />
<link rel='stylesheet' id='pretty-photo-css-css'
	href='js/prettyphoto/prettyPhotoaeb9.css?ver=3.1.4' type='text/css'
	media='all' />
<link rel='stylesheet' id='main-css-css' href='css/main5152.css?ver=1.0'
	type='text/css' media='all' />
<link rel='stylesheet' id='custom-css-css'
	href='css/custom5152.html?ver=1.0' type='text/css' media='all' />
<script type='text/javascript' src='js/jquery.easing.1.3.js'></script>
<script type='text/javascript'
	src='js/prettyphoto/jquery.prettyPhoto.js'></script>
<script type='text/javascript' src='js/jflickrfeed.js'></script>
<script type='text/javascript' src='js/jquery.liveSearch.js'></script>
<script type='text/javascript' src='js/jquery.form.js'></script>
<script type='text/javascript' src='js/jquery.validate.min.js'></script>
<script type='text/javascript' src='js/custom.js'></script>
<script src="layer.js"></script>
<script src="layui.js"></script>
<link rel="stylesheet" href="css/layui.css" media="all">

</head>

<body>

	<!-- Start of Header -->
	<div class="header-wrapper">
		<header>
			<div class="container">

				<div class="logo-container">
					<!-- Website Logo -->
					<!-- Website Logo -->
					<a href="index-2.html" title="解惑,是我们的乐趣!"> <!--<img src="images/logo.png" alt="Knowledge Base Theme">-->
						<h3 style="display: inline; color: #FFFFFF; line-height: 20px;">知之</h3>
					</a> <span class="tag-line">知之为知之,不知为不知,是知也。</span>
				</div>

				<!-- Start of Main Navigation -->
				<nav class="main-nav">
					<div class="menu-top-menu-container">
						<ul id="menu-top-menu" class="clearfix">
							<li><a href="index-2.jsp">首页</a></li>
							<li><a href="home-categories-description.html">百科</a></li>
							<li><a href="home-categories-articles.html">Java基础</a></li>
							<li><a href="articles-list.html">数据库</a></li>
							<li><a href="faq.html">FAQs</a></li>
							<li><a href="#">皮肤</a>
								<ul class="sub-menu">
									<li><a href="blue-skin.html">Blue Skin</a></li>
									<li><a href="green-skin.html">Green Skin</a></li>
									<li><a href="red-skin.html">Red Skin</a></li>
									<li><a href="index-2.html">Default Skin</a></li>
								</ul></li>
							<li><a href="#">更多精彩</a>
								<ul class="sub-menu">
									<li><a href="full-width.html">Full Width</a></li>
									<li><a href="elements.html">Elements</a></li>
									<li><a href="page.html">Sample Page</a></li>
								</ul></li>
							<li><a href="contact.html">联系我们</a></li>
							<li><a id="tourist" href="#"></a></li>
							<li><a id="topLogin" href="#">登录</a>
								<ul id="topUserIfm" class="sub-menu">
									<li><a href="blue-skin.html">个人信息</a></li>
									<li><a id="switchUser" href="#">切换账号</a></li>
									<li><a id="exitTop" href="#">退出</a></li>
								</ul></li>
							<li><a id="topRegister" href="#">注册</a></li>
						</ul>
					</div>
				</nav>
				<!-- End of Main Navigation -->

			</div>
		</header>
	</div>
	<!-- End of Header -->

	<!-- Start of Search Wrapper -->
	<div class="search-area-wrapper">
		<div class="search-area container">
			<h3 class="search-header">解惑,我们是专业的!</h3>
			<p class="search-tag-line">请输入要查询的问题!</p>

			<form id="search-form" class="search-form clearfix" method="get"
				action="#" autocomplete="off">
				<input class="search-term required" list="dl" type="text" id="nameLike" value="${nameLike==null?"":nameLike}"
					name="nameLike" placeholder="请输入..." title="* Please enter a search term!" />
				<datalist id="dl">
					<option value="java多继承" label="java"></option>
					<option value="java线程" label="java"></option>
					<option value="java序列化" label="java"></option>
					<option value="HTML5" label="前端"></option>
				</datalist>
				<input id="btnSearch" class="search-btn" type="button" value="嗖一下" />
				<div id="search-error-container"></div>
			</form>
		</div>
	</div>
	<!-- End of Search Wrapper -->

	<!-- Start of Page Container -->
	<div class="page-container">
		<div class="container">
			<div class="row">

				<!-- start of page content -->
				<div class="span8 page-content">

					<!-- 展示问题开始 -->
					<div class="row separator">
					    <!-- 热点问题开始 -->
						<section class="span4 articles-list reQuestion">
							<h3>热点问题</h3><a id="anotherBatch" style="float: right; position: relative; bottom: 50px; cursor:pointer;"><img alt="" src="images/search-loader.gif">换一拨</a>
							<c:if test="${requestScope.pdQuestion == null}">
									<%-- <jsp:forward
										page="QuestionTopServlet?req=front&op=queryquestion_jstl"></jsp:forward> --%>
									<%
										request.getRequestDispatcher("QuestionTopServlet?op=queryquestion_jstl&req=front").forward(request,
													response);
									%>
								</c:if>
							<ul class="articles change">

								

									<li class="article-entry standard">
										<h4>
											<a href="sas.do?qId=${pdQuestion.data[0].qId}">${pdQuestion.data[0].qTitle}</a>
										</h4> <span class="article-meta">${pdQuestion.data[0].qDate}<a href="#"
											title="View all posts in Server &amp; Database">~~~~~~~作者:${pdQuestion.data[0].userName}</a></span>
										<span style="cursor: pointer;" class="like-count praise">${pdQuestion.data[0].qPraise}</span>
									</li>
									<li class="article-entry standard">
										<h4>
											<a href="sas.do?qId=${pdQuestion.data[1].qId}">${pdQuestion.data[1].qTitle}</a>
										</h4> <span class="article-meta">${pdQuestion.data[1].qDate}<a href="#"
											title="View all posts in Server &amp; Database">~~~~~~~作者:${pdQuestion.data[1].userName}</a></span>
										<span style="cursor: pointer;" class="like-count praise">${pdQuestion.data[1].qPraise}</span>
									</li>
									<li class="article-entry standard">
										<h4>
											<a href="sas.do?qId=${pdQuestion.data[2].qId}">${pdQuestion.data[2].qTitle}</a>
										</h4> <span class="article-meta">${pdQuestion.data[2].qDate}<a href="#"
											title="View all posts in Server &amp; Database">~~~~~~~作者:${pdQuestion.data[2].userName}</a></span>
										<span style="cursor: pointer;" class="like-count praise">${pdQuestion.data[2].qPraise}</span>
									</li>
									<li class="article-entry standard">
										<h4>
											<a href="sas.do?qId=${pdQuestion.data[3].qId}">${pdQuestion.data[3].qTitle}</a>
										</h4> <span class="article-meta">${pdQuestion.data[3].qDate}<a href="#"
											title="View all posts in Server &amp; Database">~~~~~~~作者:${pdQuestion.data[3].userName}</a></span>
										<span style="cursor: pointer;" class="like-count praise">${pdQuestion.data[3].qPraise}</span>
									</li>
									<li class="article-entry standard">
										<h4>
											<a href="sas.do?qId=${pdQuestion.data[4].qId}">${pdQuestion.data[4].qTitle}</a>
										</h4> <span class="article-meta">${pdQuestion.data[4].qDate}<a href="#"
											title="View all posts in Server &amp; Database">~~~~~~~作者:${pdQuestion.data[4].userName}</a></span>
										<span style="cursor: pointer;" class="like-count praise">${pdQuestion.data[4].qPraise}</span>
									</li>
									<li class="article-entry standard">
										<h4>
											<a href="sas.do?qId=${pdQuestion.data[5].qId}">${pdQuestion.data[5].qTitle}</a>
										</h4> <span class="article-meta">${pdQuestion.data[5].qDate}<a href="#"
											title="View all posts in Server &amp; Database">~~~~~~~作者:${pdQuestion.data[5].userName}</a></span>
										<span style="cursor: pointer;" class="like-count praise">${pdQuestion.data[5].qPraise}</span>
									</li>
									<li class="article-entry standard">
										<h4>
											<a href="sas.do?qId=${pdQuestion.data[6].qId}">${pdQuestion.data[6].qTitle}</a>
										</h4> <span class="article-meta">${pdQuestion.data[6].qDate}<a href="#"
											title="View all posts in Server &amp; Database">~~~~~~~作者:${pdQuestion.data[66].userName}</a></span>
										<span style="cursor: pointer;" class="like-count praise">${pdQuestion.data[6].qPraise}</span>
									</li>
									<li class="article-entry standard">
										<h4>
											<a href="sas.do?qId=${pdQuestion.data[7].qId}">${pdQuestion.data[7].qTitle}</a>
										</h4> <span class="article-meta">${pdQuestion.data[7].qDate}<a href="#"
											title="View all posts in Server &amp; Database">~~~~~~~作者:${pdQuestion.data[7].userName}</a></span>
										<span style="cursor: pointer;" class="like-count praise">${pdQuestion.data[7].qPraise}</span>
									</li>
								    <li class="article-entry standard">
										<h4>
											<a href="sas.do?qId=${pdQuestion.data[8].qId}">${pdQuestion.data[8].qTitle}</a>
										</h4> <span class="article-meta">${pdQuestion.data[8].qDate}<a href="#"
											title="View all posts in Server &amp; Database">~~~~~~~作者:${pdQuestion.data[8].userName}</a></span>
										<span style="cursor: pointer;" class="like-count praise">${pdQuestion.data[8].qPraise}</span>
									</li>
								    <li class="article-entry standard">
										<h4>
											<a href="sas.do?qId=${pdQuestion.data[9].qId}">${pdQuestion.data[9].qTitle}</a>
										</h4> <span class="article-meta">${pdQuestion.data[9].qDate}<a href="#"
											title="View all posts in Server &amp; Database">~~~~~~~作者:${pdQuestion.data[9].userName}</a></span>
										<span style="cursor: pointer;" class="like-count praise">${pdQuestion.data[9].qPraise}</span>
									</li>
								
							</ul>
						</section>
                       <!-- 热点问题结束 -->
                       <!-- 公告开始 -->
						<section class="span4 articles-list">
						    <section class="widget">
						        <div class="support-widget"  style="background: rgb(131,175,155);">
							       <h3 class="title">最新公告</h3>
							       <c:if test="${pdNotice==null}">
							           <%
							               request.getRequestDispatcher("NoticeServlet?op=queryNotice_index").forward(request, response);
							           %>
							       </c:if>
							       <ul>
							       <c:if test="${pdNotice!=null}">
							         <c:forEach items="${pdNotice.data}" var="notice">
							            <li><a href="#" title="Lorem ipsum dolor sit amet,">${notice.nContent}</a><time style="float: right;">${notice.nDate}</time></li>
						             </c:forEach>
						           </c:if>
						           </ul>
						        </div>
					        </section>
						<!-- 公告结束 -->
						<!-- 最近问题开始 -->
							<h3>最近问题</h3>
							<ul class="articles">
								<c:if test="${requestScope.pdQuestionSort == null}">
									
									<%
										request.getRequestDispatcher("QuestionTopServlet?op=queryQuestion_timeSort&req=front").forward(request,
													response);
									%>
								</c:if>
								<c:forEach items="${requestScope.pdQuestionSort.data}" var="qt">
									<li class="article-entry standard">
										<h4>
											<a href="sas.do?qId=${qt.qId}">${qt.qTitle}</a>
										</h4> <span class="article-meta">${qt.qDate}<a href="#"
											title="View all posts in Server &amp; Database">~~~~~~~作者:${qt.userName}</a></span>
										<span style="cursor: pointer;" class="like-count praise">${qt.qPraise}</span>
									</li>
								</c:forEach>
							</ul>
						</section>
						<!-- 最近问题结束-->
					</div>
				</div>
				<!-- 展示问题结束 -->

				<!-- start of sidebar -->
				<aside class="span4 page-sidebar">

					<section class="widget">
						<div class="support-widget">
							<h3 class="title userTitle">游客</h3>
							<p class="intro">游客暂时只有预览的功能哦！ 查看更多详情请登录。。。。</p>
						</div>
					</section>

					<section class="widget">
						<div class="quick-links-widget">
							<h3 class="title">功能菜单</h3>
							<ul id="menu-quick-links" class="menu clearfix">
								<li><a id="quiz" href="#">我要提问</a></li>
								<li><a href="question_list.jsp">问题列表</a></li>
								<li><a id="ImAnswer" href="#">我要回答</a></li>
								<li><a id="notice" href="#">公告</a></li>
							</ul>
						</div>
					</section>
					
					<section class="widget">
							<h3 class="title">Tags</h3>
							<div class="tagcloud">
								<a href="#" class="btn btn-mini">java</a>
								<a href="#" class="btn btn-mini">php</a>
								<a href="#" class="btn btn-mini">pyhon</a>
								<a href="#" class="btn btn-mini">嵌入式</a>
								<a href="#" class="btn btn-mini">css</a>
								<a href="#" class="btn btn-mini">html5</a>
								<a href="#" class="btn btn-mini">JavaScript</a>
								<a href="#" class="btn btn-mini">jquery</a>
								<a href="#" class="btn btn-mini">bootstrqp</a>
								<a href="#" class="btn btn-mini">header</a>
								<a href="#" class="btn btn-mini">images</a>
								<a href="#" class="btn btn-mini">plugins</a>
								<a href="#" class="btn btn-mini">setting</a>
								<a href="#" class="btn btn-mini">templates</a>
								<a href="#" class="btn btn-mini">theme</a>
								<a href="#" class="btn btn-mini">time</a>
								<a href="#" class="btn btn-mini">videos</a>
								<a href="#" class="btn btn-mini">website</a>
								<a href="#" class="btn btn-mini">wordpress</a>
							</div>
						</section>
                    <!--问题排行榜开始 -->
					<section class="widget">
						<h3 class="title">问题排行榜(Top10)</h3>
						<c:if test="${pdQuestionRankSort==null}">
						     <%
						         request.getRequestDispatcher("QuestionTopServlet?op=queryQuestion_rankSort&req=front").forward(request, response);
						     %>
						</c:if>
						<ul class="articles">
						<c:forEach items="${pdQuestionRankSort.data}" var="qr">
							<li class="article-entry standard">
								<h4>
									<a href="sas.do?qId=${qr.qId}">${qr.qTitle}</a>
								</h4> <span class="article-meta">${qr.qDate}<a href="#"
									title="View all posts in Server &amp; Database">~~~~~~~作者:${qr.userName}</a></span> <span style="cursor: pointer;" class="like-count praise">${qr.c}</span>
							</li>
						</c:forEach>
						</ul>
					</section>
                 <!--问题排行榜结束-->
				</aside>
				<!-- end of sidebar -->
			</div>
		</div>
	</div>
	<!-- End of Page Container -->

	<!-- Start of Footer -->
	<footer id="footer-wrapper">
		<div id="footer" class="container">
			<div class="row">

				<div class="span3">
					<section class="widget">
						<h3 class="title">How it works</h3>
						<div class="textwidget">
							<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
								sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
								aliquam erat volutpat.</p>
							<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation
								ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo
								consequat.</p>
						</div>
					</section>
				</div>

				<div class="span3">
					<section class="widget">
						<h3 class="title">Categories</h3>
						<ul>
							<li><a href="#" title="Lorem ipsum dolor sit amet,">Advanced
									Techniques</a></li>
							<li><a href="#" title="Lorem ipsum dolor sit amet,">Designing
									in WordPress</a></li>
							<li><a href="#" title="Lorem ipsum dolor sit amet,">Server
									&amp; Database</a></li>
							<li><a href="#" title="Lorem ipsum dolor sit amet, ">Theme
									Development</a></li>
							<li><a href="#" title="Lorem ipsum dolor sit amet,">Website
									Dev</a></li>
							<li><a href="#" title="Lorem ipsum dolor sit amet,">WordPress
									for Beginners</a></li>
							<li><a href="#" title="Lorem ipsum dolor sit amet, ">WordPress
									Plugins</a></li>
						</ul>
					</section>
				</div>

				<div class="span3">
					<section class="widget">
						<h3 class="title">Latest Tweets</h3>
						<div id="twitter_update_list">
							<ul>
								<li>No Tweets loaded !</li>
							</ul>
						</div>
					</section>
				</div>

				<div class="span3">
					<section class="widget">
						<h3 class="title">Flickr Photos</h3>
						<div class="flickr-photos" id="basicuse"></div>
					</section>
				</div>

			</div>
		</div>
		<!-- end of #footer -->

		<!-- Footer Bottom -->
		<div id="footer-bottom-wrapper">
			<div id="footer-bottom" class="container">
				<div class="row">
					<div class="span6">
						<p class="copyright">Copyright © 2018. All Rights Reserved by
							KnowledgeBase.Collect from</p>
					</div>
					<div class="span6">
						<!-- Social Navigation -->
						<ul class="social-nav clearfix">
							<li class="linkedin"><a target="_blank" href="#"></a></li>
							<li class="stumble"><a target="_blank" href="#"></a></li>
							<li class="google"><a target="_blank" href="#"></a></li>
							<li class="deviantart"><a target="_blank" href="#"></a></li>
							<li class="flickr"><a target="_blank" href="#"></a></li>
							<li class="skype"><a target="_blank" href="skype:#?call"></a>
							</li>
							<li class="rss"><a target="_blank" href="#"></a></li>
							<li class="twitter"><a target="_blank" href="#"></a></li>
							<li class="facebook"><a target="_blank" href="#"></a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<!-- End of Footer Bottom -->

	</footer>

	<a href="#top" id="scroll-top"></a>

	<script type="text/javascript">
	     $(function(){
	    	 //使用layui插件实现注册弹出层
	    	 var register="";
	    	 $("#topRegister").click(function(){
	            	register = layer.open({
	    				  type: 2,
	    				  title:'亲，非常希望你能注册哦！！',
	    				  anim: 3,
	    				  time:60000,
	    				  content: 'register.jsp',
	    				  area: ['450px', '470px'],
	    				  maxmin: true
	    			});
	         });
	     });
	</script>
	<script type="text/javascript">
        $(function(){
        	 //使用layui插件实现登录弹出层
        	var login="";
        	$("#topLogin").click(function(){

            	login = layer.open({
    				  type: 2,
    				  title:'亲，登录可以查看更多信息哦!!!!',
    				  anim: 3,
    				  time:60000,
    				  content: 'login_top.jsp',
    				  area: ['300px', '300px'],
    				  maxmin: true
    			});
        	});
        	 //使用layui插件实现提问问题弹出层
        	var quiz="";
        	$("#quiz").click(function(){
        		//判断是否登录
        		if(${userTopLogin==null}){
        			layer.msg('亲，需要登录您才有权限哦！', {
    					time : 2000,
    					icon:5
    			  });
        		}else{
        		 quiz = layer.open({
    				  type: 2,
    				  title:'亲，非常欢迎你来提问题~',
    				  anim: 3,
    				  time:60000,
    				  content: 'submitQuestion.jsp',
    				  area: ['1000px', '1000px'],
    				  maxmin: true
    			});
        		layer.full(quiz);
        		}
        	});
        	 //使用layui插件实现切换用户弹出层
        	var switchUser="";
        	$("#switchUser").click(function(){

        		switchUser = layer.open({
    				  type: 2,
    				  title:'亲，请登录你要切换的账号哦！！',
    				  anim: 3,
    				  time:60000,
    				  content: 'login_top.jsp',
    				  area: ['300px', '300px'],
    				  maxmin: true
    			});
        	});
        	//点击公告需要登录才能查看
        	$("#notice").click(function(){
        		if(${userTopLogin==null}){
        			layer.msg('亲，需要登录您才有权限哦！', {
    					time : 2000,
    					icon:5
    			  });
        		}else{
        			location.href="notice.jsp";
        		}
        	});
        });
    </script>
	<script type="text/javascript">
    $(function(){
    	//判断用户是否登录！！
	    if(${userTopLogin==null}){
		   $("#tourist").text("游客");
		   $("#topUserIfm").hide();
		   console.log(11111);
	    }else{
	       $("#tourist").css("display","none");
		   $("#topUserIfm").show();
		   $("#topLogin").text("${userTopLogin.userName}");
		   $(".userTitle").text("${userTopLogin.userName}");
		   $(".intro").text("${userTopLogin.userIntroduce}");
	    }
    	//我要回答功能，通过您的关键字查询
	    $("#ImAnswer").click(function(){
	    	$('html,body').animate({scrollTop:0},'slow');
	    	layer.tips('请选择你要回答的问题的标题（或者关键字），我们将会为你找到符合你输入的关键字的问题','#nameLike', {
	    		  tips: [1, '#3595CC'],
	    		  time: 4000
	    	});
	    });
    	$("#exitTop").click(function(){
    		location.href="QuestionTopServlet?op=exitTopUser"
    	});
    });
    </script>
    <script type="text/javascript">
    $(function(){
    	//实现模糊查询
    	 $("#btnSearch").click(function(){
    		/*  location.href="QuestionTopServlet?op=queryQuestion_timeSort&req=frontList&nameLike="+$(""); */
    		//判断用户是否登录
    		if(${userTopLogin==null}){
    			layer.msg('亲，需要登录您才有权限哦！', {
					time : 2000,
					icon:5
			  });
    		}else{
    	    //使用ajax请求
    		$.ajax({
    			 url:"QuestionTopServlet?op=queryQuestion_timeSort",//url地址
    			 type:"post",//传值类型
    			 data:{
    				 "nameLike":$("#nameLike").val()//参数
    			 },
    			 //成功后的操作
    			 success:function(data){
    				 console.log(data);
    				 //判断是否成功
    				 if(data=="false"){
    					 layer.msg('亲，搜不到你输入的关键字哦！ 请输入其他关键字', {
								time : 2000
						 });
    				 }else{
    					 layer.msg('搜索成功，有效的关键字！！！！', {
								time : 3000
						 },function(){
							 location.href="QuestionTopServlet?op=queryQuestion_timeSort&req=frontList&nameLike="+$("#nameLike").val();
						 });
    					 
    				 }
    			 }
    		 });
    		}
    	 });
    	//实现换一批功能
    	$("#anotherBatch").click(function(){
    		 //生产一个随机数
    		 var randomPage=Math.ceil((Math.random()*${pdQuestion.totalPage})+1);
    		 console.log(randomPage);
    		 console.log(${pdQuestion.totalPage});
    		 //ajax请求
    		 $.ajax({
    			 url:"QuestionTopServlet?op=queryquestion_jstl",//url地址
    			 type:"post",
    			 data:{
    				 "pageRandom":randomPage//传值
    			 },
    			 dataType:"text",//类型
    			 //成功后要做的事
    			 success:function(data){
    				 //location.href="QuestionTopServlet?op=queryquestion_jstl&req=front&pageRandom="+randomPage;
    				 //将返回值转化成数组
    				 var array = JSON.parse(data);
    				 //遍历数组
    				 $.each(array, function(index, q) {
    					 console.log(index);
    					 var text = "";
    					 text += "<li class=\"article-entry standard\">";
    					 text += "<h4>";
    					 text += "									<a href=\"sas.do?qId="+q.qId+"\">"+q.qTitle+"</a>";
    					 text += "								</h4> <span class=\"article-meta\">"+q.qDate+"<a href=\"#\"";
    					 text += "									title=\"View all posts in Server &amp; Database\">~~~~~~~作者:"+q.userName+"</a></span> <span style=\"cursor: pointer;\" id=\"changePraise\" class=\"like-count praise\">"+q.qPraise+"</span>";
    					 text += "</li>";
    					 if(index==0){
    						 $(".change").html(text);
    					 }else if(index>0 && index<10){
    						 $(".change").append(text);
    					 }
    				 });
    			 }
    		 });
    	 });
    });
    </script>
    <script type="text/javascript">
      $(function(){
    	//首页不提供点赞功能
          $(".praise").click(function(){
         	 layer.msg('首页没有点赞功能哦！ 需要点击问题，进入问题才能点赞', {
 					time : 2000
 			 });
          });
          $(document).on("click", "#changePraise", function(e) {
        	  layer.msg('首页没有点赞功能哦！ 需要点击问题，进入问题才能点赞', {
					time : 2000
			  });
      	  });
      });
    </script>
</body>

</html>